package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author sqj88
 * @date 2018/1/23 21:30
 */
@Entity
@Table(name = "l2r_ipms2_card_pay")
public class L2RIpms2CardPay extends BaseEntity{
    private String l2RMemberNo;
    private String cardNo;
    private String cardId;
    private String orderNo;
    private String crsNo;
    private String taCode;
    private String prepayId;
    private String cardTaNo;
    private BigDecimal totalFee;
    private BigDecimal realPayFee;
    private String goodName;
    private String notifyUrl;
    private String isSuccess;

    @Basic
    @Column(name = "l2r_member_no", nullable = false, length = 32)
    public String getL2RMemberNo() {
        return l2RMemberNo;
    }

    public void setL2RMemberNo(String l2RMemberNo) {
        this.l2RMemberNo = l2RMemberNo;
    }

    @Basic
    @Column(name = "card_id", nullable = false, length = 32)
    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    @Basic
    @Column(name = "card_no", nullable = false, length = 32)
    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    @Basic
    @Column(name = "crs_no", nullable = false, length = 32)
    public String getCrsNo() {
        return crsNo;
    }

    public void setCrsNo(String crsNo) {
        this.crsNo = crsNo;
    }

    @Basic
    @Column(name = "order_no", nullable = true, length = 64)
    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    @Basic
    @Column(name = "prepay_id", nullable = true, length = 64)
    public String getPrepayId() {
        return prepayId;
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId;
    }

    @Basic
    @Column(name = "card_ta_no", nullable = true, length = 64)
    public String getCardTaNo() {
        return cardTaNo;
    }

    public void setCardTaNo(String cardTaNo) {
        this.cardTaNo = cardTaNo;
    }

    @Basic
    @Column(name = "total_fee", nullable = false, precision = 2)
    public BigDecimal getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(BigDecimal totalFee) {
        this.totalFee = totalFee;
    }

    @Basic
    @Column(name = "real_pay_fee", nullable = true, precision = 2)
    public BigDecimal getRealPayFee() {
        return realPayFee;
    }

    public void setRealPayFee(BigDecimal realPayFee) {
        this.realPayFee = realPayFee;
    }

    @Basic
    @Column(name = "good_name", nullable = true, length = 64)
    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    @Basic
    @Column(name = "notify_url", nullable = true, length = 255)
    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    @Basic
    @Column(name = "is_success", nullable = true, length = 2)
    public String getIsSuccess() {
        return isSuccess;
    }

    public void setIsSuccess(String isSuccess) {
        this.isSuccess = isSuccess;
    }

    @Basic
    @Column(name = "ta_code", nullable = false, length = 32)
    public String getTaCode() {
        return taCode;
    }

    public void setTaCode(String taCode) {
        this.taCode = taCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RIpms2CardPay that = (L2RIpms2CardPay) o;

        if (l2RMemberNo != null ? !l2RMemberNo.equals(that.l2RMemberNo) : that.l2RMemberNo != null) return false;
        if (cardNo != null ? !cardNo.equals(that.cardNo) : that.cardNo != null) return false;
        if (orderNo != null ? !orderNo.equals(that.orderNo) : that.orderNo != null) return false;
        if (prepayId != null ? !prepayId.equals(that.prepayId) : that.prepayId != null) return false;
        if (cardTaNo != null ? !cardTaNo.equals(that.cardTaNo) : that.cardTaNo != null) return false;
        if (totalFee != null ? !totalFee.equals(that.totalFee) : that.totalFee != null) return false;
        if (realPayFee != null ? !realPayFee.equals(that.realPayFee) : that.realPayFee != null) return false;
        if (goodName != null ? !goodName.equals(that.goodName) : that.goodName != null) return false;
        if (notifyUrl != null ? !notifyUrl.equals(that.notifyUrl) : that.notifyUrl != null) return false;
        if (isSuccess != null ? !isSuccess.equals(that.isSuccess) : that.isSuccess != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = l2RMemberNo != null ? l2RMemberNo.hashCode() : 0;
        result = 31 * result + (cardNo != null ? cardNo.hashCode() : 0);
        result = 31 * result + (orderNo != null ? orderNo.hashCode() : 0);
        result = 31 * result + (prepayId != null ? prepayId.hashCode() : 0);
        result = 31 * result + (cardTaNo != null ? cardTaNo.hashCode() : 0);
        result = 31 * result + (totalFee != null ? totalFee.hashCode() : 0);
        result = 31 * result + (realPayFee != null ? realPayFee.hashCode() : 0);
        result = 31 * result + (goodName != null ? goodName.hashCode() : 0);
        result = 31 * result + (notifyUrl != null ? notifyUrl.hashCode() : 0);
        result = 31 * result + (isSuccess != null ? isSuccess.hashCode() : 0);
        return result;
    }
}
